export const routes = [
  {
    name: "home",
    path: "/",
    alias: "/home",
    component: () => import("@/views/home/home.vue"),
  },
  {
    name: "list",
    path: "/list",
    props: (route) => {
      return {
        idx: route.query.idx,
      };
    },
    component: () => import("@/views/list/list.vue"),
  },
  {
    name: "details",
    path: "/details",
    props: (route) => {
      return {
        id: route.query.id,
      };
    },
    component: () => import("@/views/details/details.vue"),
  },
  {
    name: "shopcar",
    path: "/shopcar",
    component: () => import("@/views/shopcar/shopcar.vue"),
  },
  {
    name: "user",
    path: "/user",
    component: () => import("@/views/user/user.vue"),
  },
  {
    name: "login",
    path: "/login",
    component: () => import("@/views/login/login.vue"),
  },
  {
    name: "register",
    path: "/register",
    component: () => import("@/views/register/register.vue"),
  },
];
